package k2_oop.p1_classAndObject.demo11;

public class TestDemo11 {
    public static void main(String[] args) {
        Student s1 = new Student("tom",20);
        Student s2 = new Student("jerry",30);
        Student s3 = new Student("kitty",40);
        Student s4 = new Student("dick",50);


        System.out.println(s1.name+"===="+s1.age);
        System.out.println(s2.name+"===="+s2.age);
        System.out.println(s3.name+"===="+s3.age);
        System.out.println(s4.name+"===="+s4.age);
//
//        Student s5 = new Student("lisa");
//        System.out.println(s5.name);
//
//        Student s6 = new Student();
//        System.out.println(s6.name);
//        System.out.println(s6.age);

        Student s7 = s1;
        System.out.println(s7.name+"===="+s7.age);
        System.out.println(s2==s7);

        s7.name = "hahaha";
        System.out.println(s1.name+"===="+s1.age);
        System.out.println(s7.name+"===="+s7.age);
    }
}
